package com.letoken.platform.repo.app.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * Le账户-团队统计信息(KOL)
 * </p>
 *
 * @author 作者
 * @since 2022-12-13
 */
@Getter
@Setter
@TableName("app_user_team")
@ApiModel(value = "AppUserTeam对象", description = "Le账户-团队统计信息(KOL)")
public class AppUserTeam extends Model<AppUserTeam> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("用户编号")
    @TableId(value = "user_id", type = IdType.ASSIGN_ID)
    private Integer userId;

    @ApiModelProperty("生态建设等级")
    @TableField("eco_level")
    private Integer ecoLevel;

    @ApiModelProperty("生态建设值")
    @TableField("eco_value")
    private BigDecimal ecoValue;


    @ApiModelProperty("个人建设值")
    @TableField("user_value")
    private BigDecimal userValue;

    @ApiModelProperty("团队人数")
    @TableField("team_member")
    private Integer teamMember;

    @ApiModelProperty("团队计入团队奖励业绩")
    @TableField("team_value")
    private Integer teamValue;

    @ApiModelProperty("个人业绩")
    @TableField("user_achievement")
    private Integer userAchievement;

    @ApiModelProperty("邀请人ID 默认0没有邀请人")
    @TableField("inviter_id")
    private Integer inviterId;

    @ApiModelProperty("绑定时间")
    @TableField("band_time")
    private LocalDateTime bandTime;

    @ApiModelProperty("创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty("修改时间")
    @TableField("update_time")
    private LocalDateTime updateTime;

    @ApiModelProperty("团队总业绩")
    @TableField("team_sum_value")
    private Integer teamSumValue;

    @ApiModelProperty("商城个人消费")
    @TableField("mall_achievement")
    private BigDecimal mallCchievement;

    @ApiModelProperty("商城团队消费")
    @TableField("team_mall_achievement")
    private BigDecimal teamMallAchievement;

    @ApiModelProperty("let数量")
    @TableField(exist = false)
    @JsonIgnore
    private BigDecimal amount;

    @ApiModelProperty("费率")
    @TableField(exist = false)
    @JsonIgnore
    private BigDecimal rate;

    @ApiModelProperty("已给上级加速时间")
    @TableField("accelerate_time")
    private BigDecimal accelerateTime;

    @ApiModelProperty("基金个人消费")
    @TableField("fund_achievement")
    private BigDecimal fundCchievement;

    @ApiModelProperty("基金团队消费")
    @TableField("team_fund_achievement")
    private BigDecimal teamfundAchievement;

    @TableField("consumer_value")
    private BigDecimal consumerValue;

    @TableField("level")
    private Integer level;

    @TableField("username")
    private String username;

    @TableField("community_address")
    private String communityAddress;

    @TableField(exist = false)
    private BigDecimal yesterdayTeamFund;

    @TableField(exist = false)
    private BigDecimal yesterdayTeamConsumption;

    @TableField(exist = false)
    private BigDecimal yesterdayTeamCoinage;

    @Override
    public Serializable pkVal() {
        return this.userId;
    }

}
